home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / C / LIB / YLIB / ylib_0_10 / c / exmpl_mod < prev    next >
Text File  |  1993-09-21  |  537b  |  22 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4. #include "math.h"
  5.  
  6. int main(void)
  7. {double u,s;
  8.  int t1,t2;
  9.   s = 0;
  10.   t1 = clock();
  11.   for(u=0.0;u<100.0;u+=0.001)
  12.     s += sin(u);
  13.   t2 = clock();
  14.    printf(" %d %20.12g\n",t2-t1,s);
  15.    printf(
  16.    " if fastmath is installed and ON the first number sould be around 100.\n");
  17.    printf("If it is around 400 fastmath is OFF or you are still using the");
  18.    printf(" inline sin\nIn this case you should make sure that the modified");
  19.    printf(" math.h\nis included properly.\n");
  20. }
  21.  
  22.